package com.goockr.verificationdemo;

import android.app.Application;
import android.content.SharedPreferences;

/**
 * Created by JJT-ssd on 2017/3/1.
 */

public class App extends Application {

    //获取数据初始设置-----数据持久化处理
    public SharedPreferences preferences;
    public SharedPreferences.Editor  editor;
    @Override
    public void onCreate() {
        super.onCreate();
        //获取数据初始设置
        preferences = getSharedPreferences("preferences",MODE_PRIVATE);
        editor =preferences.edit();
        //初始设置默认没有权限
        boolean isVerification= preferences.getBoolean("isVerification",false);
        if (!isVerification)
        {
            editor.putBoolean("isVerification",false);
            editor.commit();//提交保存初始值
        }

    }
}
